package model

import "encoding/json"

type AuthInfo struct {
	Id        int    `json:"id" gorm:"primary_key;autoIncrement:true"`
	AuthKey   string `json:"authKey" gorm:"column:auth_key;comment:注册Key;type:varchar(20);size:20;" `
	AuthType  int    `json:"authType" gorm:"column:auth_type;comment:授权类型;type:int(10);size:10;"` // 1 免费测试 2 月卡
	AuthToken string `json:"authToken" gorm:"column:auth_token;comment:注册标识,机器码;type:varchar(128);size:128;"`
	LastTime  string `json:"lastTime" gorm:"column:last_time;comment:到期实际那;type:varchar(20);size:20;"` // 到期时间
	RegTime   string `json:"regTime" gorm:"column:reg_time;comment:注册时间;type:varchar(20);size:20;"`    // 到期时间
	OpenId    string `json:"openId" gorm:"column:open_id;comment:openid;type:varchar(128);size:128;"`  //
	Status    int    `json:"status" gorm:"-"`
}

func (AuthInfo) TableName() string {
	return "auth_info"
}

func (a *AuthInfo) JsonStr() string {
	bs, _ := json.Marshal(a)
	return string(bs)

}


type AppletTouristLogin struct {
    Code string `json:"code"`
}
